package com.example.demo.Service.Impl;

import com.example.demo.Service.LibrarianService;
import com.example.demo.mapper.LibrarianMapper;
import com.example.demo.model.Librarian;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class LibrarianServiceImpl implements LibrarianService {


    @Autowired
    LibrarianMapper librarianMapper;

    @Override
    public Integer addLibrarian(Librarian librarian){
        Integer result = librarianMapper.addLibrarian(librarian);
        return result;
    }

    @Override
    public List<Librarian> getLibrarianList(){
        List<Librarian> librarianList = librarianMapper.getLibrarianList();
        return librarianList;
    }

    @Override
    public Integer modifyLibrarianInfo(Librarian info){
        Integer librarian = librarianMapper.modifyLibrarianInfo(info);
        return librarian;
    }

    @Override
    public Integer deleteLibrarian(Integer id){
        Integer result = librarianMapper.deleteLibrarian(id);
        return result;
    }

}
